package identify2;

public class Hotel {

	public void entry(Object obj){
		
		if(obj instanceof Disable){
			System.out.println(obj.getClass()+" 不的进入");
			return;
		}
		
		System.out.println(obj.getClass()+" 可以进入");
		
	}
	
	public static void main(String[] args) {
		
		Hotel hotel = new Hotel();
		
		hotel.entry(new Dog());
		hotel.entry(new Japanese());
		hotel.entry(new Cat());
	}
}
